﻿namespace Movies
{
    using System.Windows;
    using MoviesDataBase;

    /// <summary>
    /// Logique d'interaction pour App.xaml
    /// </summary>
    public partial class App : Application
    {
        /// <summary>
        /// Called when [startup].
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="System.Windows.StartupEventArgs"/> instance containing the event data.</param>
        private void OnStartup(object sender, StartupEventArgs e)
        {
            //DataProvider.Init();
        }

        /// <summary>
        /// Called when [exit].
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="System.Windows.ExitEventArgs"/> instance containing the event data.</param>
        private void OnExit(object sender, ExitEventArgs e)
        {
            DataProvider.Instance.Entities.SaveChanges();
        }
    }
}
